html:div.bbt-prefs-1col
  label(data-l10n-id='better-bibtex_preferences_auto-export_explanation')

  html:div
    label(bbt:preference='extensions.zotero.translators.better-bibtex.autoExport', data-l10n-id='better-bibtex_preferences_auto-export')
    menulist(preference='extensions.zotero.translators.better-bibtex.autoExport', native='true')
      menupopup
        menuitem(data-l10n-id='better-bibtex_preferences_auto-export_immediate', value='immediate')
        menuitem(data-l10n-id='better-bibtex_preferences_auto-export_idle', value='idle')
        menuitem(data-l10n-id='better-bibtex_preferences_auto-export_off', value='off').

  html:div
    label(bbt:preference='extensions.zotero.translators.better-bibtex.autoExportDelay', data-l10n-id='better-bibtex_preferences_auto-export_delay')
    html:input(max='300', min='2', preference='extensions.zotero.translators.better-bibtex.autoExportDelay', type='range')
    html:input(preference='extensions.zotero.translators.better-bibtex.autoExportDelay', readonly, rows='1', size='3', type='text')
    label(data-l10n-id='better-bibtex_units_seconds')

html:div.bbt-prefs-2col#bbt-prefs-auto-exports
  menulist.bbt-prefs-2col-span#bbt-prefs-auto-export-select(native='true', oncommand='Zotero.BetterBibTeX.PrefPane.autoexport.refresh()')
    menupopup

  label(data-ae-field='type')
  html:input.plain(data-ae-field='name', readonly, type='text', value)

  label(data-l10n-id='better-bibtex_preferences_auto-export_status')
  html:input.plain(data-ae-field='status', readonly, size='80', type='text', value)

  label(data-l10n-id='better-bibtex_preferences_auto-export_updated')
  html:input.plain(data-ae-field='updated', readonly, size='80', type='text', value)

  label(data-l10n-id='better-bibtex_preferences_auto-export_translator')
  html:input.plain(data-ae-field='translator', readonly, type='text', value)

  label(data-l10n-id='better-bibtex_preferences_auto-export_target')
  html:input.plain(data-ae-field='path', readonly, size='80', type='text', value)

  // bibtex
  html:div.bbt-autoexport-options.bbt-autoexport-BetterBibTeX.bbt-prefs-2col-span
    label.bbt-autoexport-options.bbt-autoexport-BetterBibTeX(data-l10n-id='better-bibtex_preferences_export_bibtex_urls')
    menulist(data-ae-field='bibtexURL', native='true', oncommand='Zotero.BetterBibTeX.PrefPane.autoexport.edit(this)')
      menupopup
        menuitem(data-l10n-id='better-bibtex_preferences_export_bibtex_urls_off', value='off')
        menuitem(data-l10n-id='better-bibtex_preferences_export_bibtex_urls_note', value='note')
        menuitem(data-l10n-id='better-bibtex_preferences_export_bibtex_urls_note-url-ish', value='note-url-ish')
        menuitem(data-l10n-id='better-bibtex_preferences_export_bibtex_urls_url', value='url')
        menuitem(data-l10n-id='better-bibtex_preferences_export_bibtex_urls_url-ish', value='url-ish').

    img(src='chrome://zotero-better-bibtex/content/skin/attention.svg', style='width:16px;height:16px', tooltip='bbt-tooltip-bibtexURL')

  // biblatex
  checkbox.bbt-autoexport-options.bbt-autoexport-BetterBibLaTeX.bbt-prefs-2col-span(
    data-ae-field='asciiBibLaTeX'
    data-l10n-id='better-bibtex_preferences_export_biblatex_ascii'
    oncommand='Zotero.BetterBibTeX.PrefPane.autoexport.edit(this)'
    native='true'
  )

  checkbox.bbt-autoexport-options.bbt-autoexport-BetterBibLaTeX.bbt-prefs-2col-span(
    data-ae-field='biblatexExtendedNameFormat'
    data-l10n-id='better-bibtex_preferences_export_biblatex_extended-name-format'
    oncommand='Zotero.BetterBibTeX.PrefPane.autoexport.edit(this)'
    native='true'
  )

  //  both bibtex and biblatex
  html:div.bbt-autoexport-options.bbt-autoexport-BetterBibTeX.bbt-autoexport-BetterBibLaTeX.bbt-prefs-2col-span
    label(data-l10n-id='better-bibtex_preferences_export_fields_doi-and-url')
    menulist(data-ae-field='DOIandURL', native='true', oncommand='Zotero.BetterBibTeX.PrefPane.autoexport.edit(this)')
      menupopup
        menuitem(data-l10n-id='better-bibtex_preferences_export_fields_doi-and-url_both', value='both')
        menuitem(data-l10n-id='better-bibtex_preferences_export_fields_doi-and-url_doi', value='doi')
        menuitem(data-l10n-id='better-bibtex_preferences_export_fields_doi-and-url_url', value='url').

  checkbox.bbt-autoexport-options.bbt-autoexport-BetterBibTeX.bbt-autoexport-BetterBibLaTeX.bbt-prefs-2col-span(
    data-ae-field='exportNotes'
    data-l10n-id='better-bibtex_preferences_auto-export_fields_notes'
    oncommand='Zotero.BetterBibTeX.PrefPane.autoexport.edit(this)'
    native='true'
  )

  checkbox.bbt-autoexport-options.bbt-autoexport-BetterBibTeX.bbt-autoexport-BetterBibLaTeX.bbt-prefs-2col-span(
    data-ae-field='useJournalAbbreviation'
    data-l10n-id='better-bibtex_preferences_auto-export_fields_journal-abbrev'
    oncommand='Zotero.BetterBibTeX.PrefPane.autoexport.edit(this)'
    native='true'
  )

  checkbox.bbt-autoexport-options.bbt-autoexport-BetterBibLaTeX.bbt-prefs-2col-span(
    data-ae-field='biblatexAPA'
    label='biblatex-apa'
    oncommand='Zotero.BetterBibTeX.PrefPane.autoexport.edit(this)'
    native='true'
  )

  checkbox.bbt-autoexport-options.bbt-autoexport-BetterBibLaTeX.bbt-prefs-2col-span(
    data-ae-field='biblatexChicago'
    label='biblatex-chicago'
    oncommand='Zotero.BetterBibTeX.PrefPane.autoexport.edit(this)'
    native='true'
  )

  //  all
  checkbox.bbt-prefs-2col-span(
    data-ae-field='recursive'
    data-l10n-id='better-bibtex_preferences_auto-export_fields_recursive'
    oncommand='Zotero.BetterBibTeX.PrefPane.autoexport.edit(this)'
    native='true'
  )

  html:div.bbt-prefs-2col-span
    button(data-l10n-id='better-bibtex_preferences_auto-export_remove', oncommand='Zotero.BetterBibTeX.PrefPane.autoexport.remove()')
    button(data-l10n-id='better-bibtex_preferences_auto-export_run', oncommand='Zotero.BetterBibTeX.PrefPane.autoexport.run()')
    button(data-l10n-id='better-bibtex_preferences_auto-export_fields_cached', oncommand='Zotero.BetterBibTeX.PrefPane.autoexport.refresh()')

    html:input.plain(data-ae-field='cacherate', readonly, type='text', value)
